package com.yiba.vpn.core;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/10/27 0027.
 */

public class VPNNode implements Serializable {
    /**
     * server : 192.168.1.94
     * server_port : 10086
     * password : marking
     * method : aes-256-cfb
     * config : {"ip":"172.25.0.1","dns":["223.5.5.5","114.114.114.114","8,8,8,8"],"proxy_domain":["qq.com","aiqiyi.com"]}
     */

    private String server;
    private String server_port;
    private String password;
    private String method;
    private ConfigBean config;

    public String getServer() {
        return server;
    }

    public void setServer(String server) {
        this.server = server;
    }

    public String getServer_port() {
        return server_port;
    }

    public void setServer_port(String server_port) {
        this.server_port = server_port;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public ConfigBean getConfig() {
        return config;
    }

    public void setConfig(ConfigBean config) {
        this.config = config;
    }

    public static class ConfigBean implements Serializable {
        /**
         * ip : 172.25.0.1
         * dns : ["223.5.5.5","114.114.114.114","8,8,8,8"]
         * proxy_domain : ["qq.com","aiqiyi.com"]
         */
        public ConfigBean() {
            direct_domain = new ArrayList<>();
            direct_domain.add("localhost");
            direct_domain.add("192.168.1.53");
            direct_domain.add("shadows.rocks");
            direct_domain.add("s3-us-west-2.amazonaws.com");
            direct_domain.add("wifitj.pegasus-mobile.com");
            //google 广告不需要走代理
//            direct_domain.add("pagead2.googlesyndication.com");
//            direct_domain.add("app-measurement.com");
//            direct_domain.add("googleads.g.doubleclick.net");
//            direct_domain.add("google");

//                direct_domain.add("d8zone.net");
//                direct_domain.add("mobilegw.alipay.com");
//                direct_domain.add("mobilegw.alipaydev.com");
//                direct_domain.add("m.alipay.com");
//                direct_domain.add("wappaygw.alipay.com");
//                direct_domain.add("mclient.alipay.com");
//                direct_domain.add("h5.m.taobao.com");
//                direct_domain.add("mygw.alipay.com");
//                direct_domain.add("taobao.com");
//                direct_domain.add("android.bugly.qq.com");
//                direct_domain.add("szshort.pay.weixin.qq.com");
//                direct_domain.add("ad.18wifibank.com");
            //proxy_domain.add("wx.qlogo.cn");
        }

        private String ip;
        private List<String> dns;
        private List<String> proxy_domain;//代理路由
        private List<String> direct_domain;//直连路由

        public String getIp() {
            return ip;
        }

        public void setIp(String ip) {
            this.ip = ip;
        }

        public List<String> getDns() {
            return dns;
        }

        public void setDns(List<String> dns) {
            this.dns = dns;
        }

        public List<String> getProxy_domain() {
            return proxy_domain;
        }

        public void setProxy_domain(List<String> proxy_domain) {
            this.proxy_domain = proxy_domain;
        }

        public List<String> getDirect_domain() {
            return direct_domain;
        }
    }
}
